// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
DEFINE OBJECTS 3
DEFINE OBJECT SANNY BUILDER 3.04      
DEFINE OBJECT CARDBOARDBOX2            // Object number -1
DEFINE OBJECT CIGAR                    // Object number -2

DEFINE MISSIONS 1
DEFINE MISSION 0 AT @MISSN_04         

DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 500

{$VERSION 3.1.0027}

//-------------MAIN---------------
03A4: name_thread 'MAIN' 
016A: fade 0 time 0 
01F0: set_max_wanted_level_to 6 
0111: set_wasted_busted_check 0 
00C0: set_current_time_hours_to 8 minutes_to 0 
023C: load_special_actor 'TENPEN' as 1 // models 290-299 
04E4: unknown_refresh_game_renderer_at 1541 -1675.4 
03CB: set_rendering_origin_at 1541.156 -1675.352 13.55 
0053: $PLAYER_CHAR = create_player #NULL at 1541.156 -1675.352 13.552 
087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 
087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 
087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 
087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 
070D: rebuild_player $PLAYER_CHAR 
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01 
01F5: $PLAYER_ACTOR = get_player_actor $PLAYER_CHAR 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
0247: load_model #COPBIKE 
0247: load_model #COPCARLA 
0247: load_model #DESERT_EAGLE 
0247: load_model #COLT45 
038B: load_requested_models 
0213: $DRUGS = create_pickup #CARDBOARDBOX2 type 3 at 331.101 1128.411 1082.88 

:MAIN_271
00D6: if or
8248:   not model #COPBIKE available 
8248:   not model #COPCARLA available 
8248:   not model #DESERT_EAGLE available 
8248:   not model #COLT45 available 
004D: jump_if_false @MAIN_313 
0001: wait 0 ms 
0002: jump @MAIN_271 

:MAIN_313
0674: set_car_model #COPCARLA numberplate "_CRASH_" 
00A5: $My_Car = create_car #COPCARLA at 1535.743 -1678.094 13.09914 
00A5: $My_Bike = create_car #COPBIKE at 1535.743 -1665.094 13.09914 
02AC: set_car $My_Car immunities BP 0 FP 1 EP 0 CP 0 MP 0 
0175: set_car $My_Car Z_angle_to 0 
020A: set_car $My_Car door_status_to 0 
053F: set_car $My_Car tires_vulnerability 0 
01B6: set_weather 1 
0001: wait 0 ms 
01B4: set_player $PLAYER_CHAR can_move 0 
04BB: select_interior 0 
0629: change_integer_stat 181 to 4 
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 
0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 
0004: $DEFAULT_WAIT_TIME = 250 
03E6: remove_text_box 
0004: $MISSION_1 = 2 
0004: $ONMISSION = 0 
01B4: set_player $PLAYER_CHAR can_move 1 
016A: fade 1 time 1000 

:MAIN_526
0001: wait $DEFAULT_WAIT_TIME ms 
00BF: $Time_Hours = current_time_hours, $Time_Mins = current_time_minutes 
00D6: if and
0038:   $ONMISSION == 0 
00E1:   player 0 pressed_key 11 
004D: jump_if_false @MAIN_526 
0417: start_mission 0 
0002: jump @MAIN_526 

//-------------Mission 14---------------
// This was an early attempt to remake a mission that already existed "Cleaning the Hood"
// I found out it is much easier just to make your own mission from scratch than it is
// to edit the ones that exist. As this turned out there is actually very little left of the
// original script. But you can compair them and see that I left much of the crack den alone.
:MISSN_04
03A4: name_thread 'MISSN_04' 
0050: gosub @MISSN_04_68  //Start Mission
00D6: if 
0112:   wasted_or_busted 
004D: jump_if_false @MISSN_04_61 
02A7: $CRASH_MARKER = create_icon_marker_and_sphere 16 at 1541.156 -1675.352 13.552 

:MISSN_04_61
0002: jump @MISSN_04_7188  //Clean up
end_thread


:MISSN_04_68
0317: increment_mission_attempts 
0004: $ONMISSION = 1 
0006: 70@ = 0 
0006: 71@ = 0 
0006: 72@ = 0 
0006: 73@ = 0 
0006: 74@ = 0 
054C: use_GXT_table 'JABM04' 
0001: wait 0 ms 
01B4: set_player $PLAYER_CHAR can_move 0 
016A: fade 0 time 0 

:MISSN_04_140
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_140 
04BB: select_interior 0 
0247: load_model #COLT45 
023C: load_special_actor 'HERN' as 1 // models 290-299 
060A: create_decision_maker_type 0 store_to 75@ // decision\allowed\m_.ped files 
0247: load_model #BMYDRUG 
0247: load_model #HMYCR 
0247: load_model #BAT 
04ED: load_animation "DEALER" 
04ED: load_animation "GANGS" 
060A: create_decision_maker_type 2 store_to 34@ // decision\allowed\m_.ped files 
060A: create_decision_maker_type 3 store_to 76@ // decision\allowed\m_.ped files 
03CF: load_wav 37472 as 1 
038B: load_requested_models 

:MISSN_04_243
0001: wait 0 ms 
00D6: if and
0248:   model #COLT45 available 
023D:   special_actor 1 loaded 
0248:   model #COPCARLA available 
0248:   model #BMYDRUG available 
0248:   model #HMYCR available 
0248:   model #BAT available 
04EE:   animation "DEALER" loaded 
04EE:   animation "GANGS" loaded 
004D: jump_if_false @MISSN_04_243 
01F7: set_player $PLAYER_CHAR ignored_by_cops 1 
009A: 69@ = create_actor_pedtype 24 model #SPECIAL01 at 1575.029 -1693.979 6.2187 
0173: set_actor 69@ Z_angle_to 270.7 
0746: set_acquaintance 0 of_actors_pedtype 24 to_actors_pedtype 0 // see ped.dat 
0746: set_acquaintance 0 of_actors_pedtype 0 to_actors_pedtype 24 // see ped.dat 
01B2: give_actor 69@ weapon 22 ammo 99999 // Load the weapon model before using this 
060B: set_actor 69@ decision_maker_to 75@ 
02A9: set_actor 69@ immune_to_nonplayer 1 
08AF: set_actor 69@ max_health_to 500 
0223: set_actor 69@ health_to 500 
0568: set_actor 69@ targetable 1 
0446: set_actor 69@ immune_to_headshots 1 
00A1: put_actor $PLAYER_ACTOR at 1577.431 -1694.384 6.2187 
0173: set_actor $PLAYER_ACTOR Z_angle_to 92.0 
02A3: enable_widescreen 1 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -1.0 2.0 2.0 rotation 0.0 0.0 0.0 0.0 2 
0001: wait 500 ms 
016A: fade 1 time 1000 

:MISSN_04_507
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_507 
018A: 38@ = create_checkpoint_at 2346.082 -1161.294 26.8562    //First Check Point LV Gang House
0395: clear_area 1 at 2346.082 -1161.294 26.8562 radius 20.0 
0006: 75@ = 0 

// Cut Scene Conversation - Crazy to be a cop.
03CF: load_wav 45222 as 1 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -1.0 4.0 1.5 rotation 0.0 0.0 0.0 0.0 2 
0967: actor $PLAYER_ACTOR move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH01' time 5000 flag 1  // ~z~Rule number one, you got to be crazy to be a cop?
0050: gosub @MISSN_04_7305 
0968: actor $PLAYER_ACTOR stop_mouth 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_1285 
03CF: load_wav 45223 as 1 
067C: put_camera_on_actor 69@ with_offset 0.5 4.0 1.5 rotation 0.0 0.0 0.0 0.0 2 
0967: actor 69@ move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH02' time 5000 flag 1  // ~z~Yeah I know!
0050: gosub @MISSN_04_7305 
0968: actor 69@ stop_mouth 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_1285 
03CF: load_wav 45224 as 1 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -0.5 1.0 1.5 rotation 0.0 0.0 0.0 0.0 2 
0967: actor $PLAYER_ACTOR move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH03' time 5000 flag 1  // ~z~You ever heard that old saying? Everybody runs away from a man with a gun, but a cop runs toward him.
0050: gosub @MISSN_04_7305 
0968: actor $PLAYER_ACTOR stop_mouth 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_1285 
03CF: load_wav 45225 as 1 
067C: put_camera_on_actor 69@ with_offset 0.5 1.0 1.5 rotation 0.0 0.0 0.0 0.0 2 
0967: actor 69@ move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH04' time 5000 flag 1  // ~z~Yeah.
0050: gosub @MISSN_04_7305 
0968: actor 69@ stop_mouth 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_1285 
03CF: load_wav 45226 as 1 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.5 2.0 -0.5 rotation 0.0 0.0 0.0 0.0 2 
0967: actor $PLAYER_ACTOR move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH05' time 5000 flag 1  // ~z~We're in this together now... partners.
0050: gosub @MISSN_04_7305 
0968: actor $PLAYER_ACTOR stop_mouth 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_1285 
03CF: load_wav 45227 as 1 
067C: put_camera_on_actor 69@ with_offset 0.0 0.5 0.7 rotation 0.0 -45.0 0.0 0.0 2 
0967: actor 69@ move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH06' time 5000 flag 1  // ~z~Yeah, whatever it takes!
0050: gosub @MISSN_04_7305 
0968: actor 69@ stop_mouth 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_1285 
03CF: load_wav 45228 as 1 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 0.5 0.7 rotation 0.0 -45.0 0.0 0.0 2 
0967: actor $PLAYER_ACTOR move_mouth -1 ms 
00BC: show_text_highpriority GXT 'CTH07' time 5000 flag 1  // ~z~And now you understand.
0050: gosub @MISSN_04_7305 
0968: actor $PLAYER_ACTOR stop_mouth 
// End of Cut Scene Conversation - Crazy to be a cop.
:MISSN_04_1285
02A3: enable_widescreen 0 
03E5: show_text_box 'CTH08'  // Get in the CRASH vehicle.
0373: set_camera_directly_behind_player 
02EB: restore_camera_with_jumpcut 
01B4: set_player $PLAYER_CHAR can_move 1 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
0631: put_actor 69@ in_group $PLAYER_GROUP 
07B4: set_player $PLAYER_CHAR gang_recruitment_enabled 0 
07CB: set_actor 69@ supporting_fire 0 
0A20: unknown_player $PLAYER_CHAR flag 1 
0864: set_interior_at 2165.72 -1673.14 radius 10.0 access 1 
0864: set_interior_at 319.56 1117.64 radius 10.0 access 1 
09DD: unknown_player_group 1 
09B5: unknown_actor 69@ flag 0 
009A: 48@ = create_actor_pedtype 25 model #HMYCR at 2375.2 -1141.005 28.5377 
060B: set_actor 48@ decision_maker_to 75@ 
009A: 35@ = create_actor_pedtype 25 model #BMYDRUG at 2376.578 -1141.211 28.5789 
08AF: set_actor 35@ max_health_to 120 
0223: set_actor 35@ health_to 120 
0173: set_actor 35@ Z_angle_to 89.7 
060B: set_actor 35@ decision_maker_to 75@ 
07DD: set_actor 35@ temper_to 75 // see pedstats.dat 
0A09: set_actor 35@ muted 1 // versionB 
0639: AS_actor 35@ rotate_to_actor 48@ 
0639: AS_actor 48@ rotate_to_actor 35@ 
0006: 75@ = 0 

:MISSN_04_1522
0001: wait 0 ms 
00D6: if 
8118:   not actor 69@ dead 
004D: jump_if_false @MISSN_04_7096 
00D6: if and
0039:   75@ == 0 
056C:   actor $PLAYER_ACTOR driving_police_car 
004D: jump_if_false @MISSN_04_1585 
03E6: remove_text_box 
03E5: show_text_box 'CTH09'  // Take Hernandez and introduce him to some street justice on some dealers.
0006: 75@ = 1 

:MISSN_04_1585
00D6: if and
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 2346.082 -1161.294 26.8562 radius 4.0 4.0 4.0 
0104:   actor 69@ near_actor $PLAYER_ACTOR radius 30.0 30.0 8.0 sphere 0 
004D: jump_if_false @MISSN_04_1522 
00D6: if 
00DF:   actor $PLAYER_ACTOR driving 
004D: jump_if_false @MISSN_04_1679 
0633: AS_actor $PLAYER_ACTOR exit_car 

:MISSN_04_1679
01B4: set_player $PLAYER_CHAR can_move 0 
0164: disable_marker 38@ 
0187: 44@ = create_marker_above_actor 35@ 
03E6: remove_text_box 
03E5: show_text_box 'CTH10'  // This dealer owes you money go make an example of him for the others.
067C: put_camera_on_actor 35@ with_offset 2.0 0.5 0.0 rotation 0.0 0.0 0.0 0.0 2 
0605: actor 35@ perform_animation_sequence "DEALER_IDLE" IFP_file "DEALER" 4.0 loop 0 0 0 0 time 1500 // versionA 
0001: wait 1500 ms 
0605: actor 35@ perform_animation_sequence "DEALER_DEAL" IFP_file "GANGS" 4.0 loop 0 0 0 0 time 2000 // versionA 
0001: wait 2000 ms 
05BF: AS_actor 48@ look_at_actor 35@ 2000 ms 
05C9: AS_actor 35@ on_guard 2000 ms 
0001: wait 2000 ms 
0605: actor 35@ perform_animation_sequence "SHOP_PAY" IFP_file "DEALER" 4.0 loop 0 0 0 0 time -1 // versionA 
0605: actor 48@ perform_animation_sequence "DRUGS_BUY" IFP_file "GANGS" 4.0 loop 0 0 0 0 time -1 // versionA 
0001: wait 1000 ms 
00BE: text_clear_all 
0373: set_camera_directly_behind_player 
02A3: enable_widescreen 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
03E6: remove_text_box 
01B2: give_actor 35@ weapon 22 ammo 99999 // Load the weapon model before using this 
087E: set_actor 35@ weapon_droppable 0 
05E2: AS_actor 35@ kill_actor $PLAYER_ACTOR 

:MISSN_04_1998
0001: wait 0 ms 
00D6: if 
8118:   not actor 69@ dead 
004D: jump_if_false @MISSN_04_6992 
00D6: if 
0118:   actor 35@ dead 
004D: jump_if_false @MISSN_04_1998 
016A: fade 0 time 1000 

:MISSN_04_2041
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_2041 
0164: disable_marker 44@ 
009B: destroy_actor 48@ 
009B: destroy_actor 35@ 
0249: release_model #BMYDRUG 
04EF: release_animation "DEALER" 
03CB: set_rendering_origin_at 2373.0 -1144.4 27.5 
0395: clear_area 1 at 2375.17 -1144.74 28.08 radius 4.0 
03BA: clear_cars_from_cube_cornerA 2378.28 -1148.13 28.0 cornerB 2274.92 -1141.33 28.31 
01B4: set_player $PLAYER_CHAR can_move 0 
02A3: enable_widescreen 1 
0860: link_actor 69@ to_interior 0 
06AB: set_actor 69@ all_weapons_hidden 1 
06C9: remove_actor 69@ from_group 
0792: disembark_instantly_actor 69@ 
0647: unknown_actor 69@ look_task 
0647: unknown_actor $PLAYER_ACTOR look_task 
0860: link_actor $PLAYER_ACTOR to_interior 0 
06AB: set_actor $PLAYER_ACTOR all_weapons_hidden 1 
0001: wait 1000 ms 
0395: clear_area 1 at 2375.17 -1144.74 28.08 radius 5.0 
00D6: if 
00DF:   actor $PLAYER_ACTOR driving 
004D: jump_if_false @MISSN_04_2284 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2374.462 -1145.925 28.1362 

:MISSN_04_2284
00D6: if 
00DF:   actor 69@ driving 
004D: jump_if_false @MISSN_04_2320 
0362: remove_actor 69@ from_car_and_place_at 2360.27 -1145.8 28.15 

:MISSN_04_2320
00A1: put_actor $PLAYER_ACTOR at 2374.462 -1145.925 28.1362 
00A1: put_actor 69@ at 2360.27 -1145.8 28.15 
0173: set_actor $PLAYER_ACTOR Z_angle_to 333.0 
067C: put_camera_on_actor $PLAYER_ACTOR with_offset 0.0 1.3 -1.3 rotation 0.0 0.0 0.0 0.0 2 
05D3: AS_actor 69@ goto_point 2373.27 -1145.8 28.15 mode 4 500 ms // versionA 

:MISSN_04_2437
0001: wait 0 ms 
00D6: if 
00EF:   actor 69@ 0 near_point 2373.27 -1145.8 radius 0.2 0.2 stopped 
004D: jump_if_false @MISSN_04_2437 
0173: set_actor 69@ Z_angle_to 310.0 
016A: fade 1 time 500 

:MISSN_04_2496
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_2496 
0006: 75@ = 0 
0605: actor 69@ perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time 6000 // versionA 
0647: unknown_actor 69@ look_task 
00BC: show_text_highpriority GXT 'CTH11' time 10000 flag 1  // ~z~Look, I'm a good cop!
05BF: AS_actor 69@ look_at_actor $PLAYER_ACTOR -1 ms 
03CF: load_wav 45229 as 1 
0967: actor 69@ move_mouth 3000 ms 
0050: gosub @MISSN_04_7305 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_3073 
0647: unknown_actor $PLAYER_ACTOR look_task 
00BC: show_text_highpriority GXT 'CTH12' time 10000 flag 1  // ~z~Well I deal with drug dealers, gang bangers, and psychotics.
05BF: AS_actor $PLAYER_ACTOR look_at_actor 69@ -1 ms 
03CF: load_wav 45230 as 1 
0967: actor $PLAYER_ACTOR move_mouth 5000 ms 
0050: gosub @MISSN_04_7305 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_3073 
0647: unknown_actor 69@ look_task 
00BC: show_text_highpriority GXT 'CTH13' time 10000 flag 1  // ~z~I didn't mean anything by it!
05BF: AS_actor 69@ look_at_actor $PLAYER_ACTOR -1 ms 
03CF: load_wav 45231 as 1 
0967: actor 69@ move_mouth 5000 ms 
0050: gosub @MISSN_04_7305 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_3073 
00BC: show_text_highpriority GXT 'CTH14' time 10000 flag 1  // ~z~Why the hell you want to be a cop anyway?  Ah, forget I asked.
0605: actor 69@ perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 // versionA 
0647: unknown_actor $PLAYER_ACTOR look_task 
06A9: AS_actor $PLAYER_ACTOR look_at_point 2375.1 -1144.7 28.0 1000 ms 
0647: unknown_actor 69@ look_task 
06A9: AS_actor 69@ look_at_point 2375.1 -1144.7 28.0 3000 ms 
03CF: load_wav 45232 as 1 
0967: actor $PLAYER_ACTOR move_mouth 4000 ms 
0050: gosub @MISSN_04_7305 
00D6: if 
0039:   75@ == 0 
004D: jump_if_false @MISSN_04_3073 
0687: clear_actor $PLAYER_ACTOR task 
0605: actor $PLAYER_ACTOR perform_animation_sequence "FIGHTA_G" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 // versionA 
0006: 110@ = 0 

:MISSN_04_2977
00D6: if 
0023:   0.351 > 110@ 
004D: jump_if_false @MISSN_04_3053 
0001: wait 0 ms 
00D6: if 
0611:   actor $PLAYER_ACTOR performing_animation "FIGHTA_G" 
004D: jump_if_false @MISSN_04_2977 
0613: 110@ = actor $PLAYER_ACTOR animation "FIGHTA_G" time 
0002: jump @MISSN_04_2977 

:MISSN_04_3053
097A: play_audio_at 2375.177 -1144.748 28.0885 event 1136 

:MISSN_04_3073
0687: clear_actor $PLAYER_ACTOR task 
00BE: text_clear_all 
043C: disable_sounds_after_fade 0 
016A: fade 0 time 0 
06AB: set_actor $PLAYER_ACTOR all_weapons_hidden 0 
06AB: set_actor 69@ all_weapons_hidden 0 
0647: unknown_actor 69@ look_task 
0647: unknown_actor $PLAYER_ACTOR look_task 
04EF: release_animation "GANGS" 
0164: disable_marker 38@ 
018A: 38@ = create_checkpoint_at 2351.663 -1167.865 27.7891 
06C9: remove_actor 69@ from_group 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
0631: put_actor 69@ in_group $PLAYER_GROUP 
07B4: set_player $PLAYER_CHAR gang_recruitment_enabled 0 
07CB: set_actor 69@ supporting_fire 0 
0925: restore_camera_to_user_defined 
0173: set_actor $PLAYER_ACTOR Z_angle_to 152.235 
0373: set_camera_directly_behind_player 
02A3: enable_widescreen 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
0213: 79@ = create_pickup #COLT45 type 3 at 2375.743 -1147.309 27.4782 
043C: disable_sounds_after_fade 1 
00BE: text_clear_all 
016A: fade 1 time 1000 

:MISSN_04_3248
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_3248 
03E5: show_text_box 'CTH15'  // Enter the local crack den and get paid one way or another.

:MISSN_04_3276
0001: wait 0 ms 
00D6: if 
8118:   not actor 69@ dead 
004D: jump_if_false @MISSN_04_6992 
00D6: if and
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 2351.663 -1167.865 27.7891 radius 4.0 4.0 4.0 
0104:   actor 69@ near_actor $PLAYER_ACTOR radius 30.0 30.0 8.0 sphere 0 
004D: jump_if_false @MISSN_04_3276 
016A: fade 0 time 1000 

:MISSN_04_3376
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_3376 
04BB: select_interior 5 
04F9: set_interior 1 color_to 0 
04E4: unknown_refresh_game_renderer_at 319.15 1120.89 
0581: enable_radar 0 
016A: fade 0 time 0 
0860: link_actor $PLAYER_ACTOR to_interior 5 
00A1: put_actor $PLAYER_ACTOR at 319.15 1114.89 1082.87 
0173: set_actor $PLAYER_ACTOR Z_angle_to 90.0 
015F: set_camera_position 318.297 1115.438 1085.054 rotation 0.0 0.0 0.0 
0160: set_camera_point_at 318.7138 1116.318 1084.827 mode 2 
01B4: set_player $PLAYER_CHAR can_move 0 
02A3: enable_widescreen 1 
0395: clear_area 1 at 319.15 1120.89 1082.87 radius 100.0 
0164: disable_marker 39@ 
0247: load_model #LSV1 
0247: load_model #HFYPRO 
0247: load_model #BFYPRO 
0247: load_model #BMYDRUG 
0247: load_model #CIGAR 
04ED: load_animation "CRACK" 
04ED: load_animation "BLOWJOBZ" 
04ED: load_animation "BASEBALL" 
038B: load_requested_models 

:MISSN_04_3608
0001: wait 0 ms 
00D6: if and
04EE:   animation "CRACK" loaded 
04EE:   animation "BLOWJOBZ" loaded 
04EE:   animation "BASEBALL" loaded 
004D: jump_if_false @MISSN_04_3608 

:MISSN_04_3656
0001: wait 0 ms 
00D6: if and
0248:   model #LSV1 available 
0248:   model #BFYPRO available 
0248:   model #HFYPRO available 
0248:   model #CIGAR available 
0248:   model #BMYDRUG available 
004D: jump_if_false @MISSN_04_3656 
0615: define_AS_pack_begin 68@ 
05D3: AS_actor -1 goto_point 315.81 1122.3 1082.8 mode 6 10000 ms // versionA 
0605: actor -1 perform_animation_sequence "BBALBAT_IDLE_01" IFP_file "CRACK" 4.0 loop 1 0 0 0 time -1 // versionA 
0616: define_AS_pack_end 68@ 
07FB: set_interior 'LACRAK' access 0  // Crack Den
009A: 61@ = create_actor_pedtype 5 model #HFYPRO at 309.77 1123.5 1082.87 
0860: link_actor 61@ to_interior 5 
0173: set_actor 61@ Z_angle_to 107.12 
0812: AS_actor 61@ perform_animation "CRCKIDLE4" IFP_file "CRACK" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
060B: set_actor 61@ decision_maker_to 75@ 
009A: 36@ = create_actor_pedtype 25 model #HFYPRO at 317.5892 1124.777 1082.867 
0860: link_actor 36@ to_interior 5 
0173: set_actor 36@ Z_angle_to 180.0 
0812: AS_actor 36@ perform_animation "CRCKIDLE2" IFP_file "CRACK" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
060B: set_actor 36@ decision_maker_to 75@ 
009A: 54@ = create_actor_pedtype 25 model #LSV1 at 325.0 1119.975 1082.875 
0860: link_actor 54@ to_interior 5 
0173: set_actor 54@ Z_angle_to 90.0 
0812: AS_actor 54@ perform_animation "CRCKIDLE1" IFP_file "CRACK" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
060B: set_actor 54@ decision_maker_to 75@ 
0107: 80@ = create_object #CIGAR at 2440.58 -1979.89 1082.2 
070A: AS_actor 54@ attach_to_object 80@ offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time -1 
009A: 49@ = create_actor_pedtype 25 model #LSV1 at 320.1898 1123.292 1082.875 
0860: link_actor 49@ to_interior 5 
0173: set_actor 49@ Z_angle_to 177.9659 
0812: AS_actor 49@ perform_animation "CRCKIDLE3" IFP_file "CRACK" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
060B: set_actor 49@ decision_maker_to 75@ 
0107: 81@ = create_object #CIGAR at 2440.58 -1979.89 1082.2 
070A: AS_actor 49@ attach_to_object 81@ offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time -1 
009A: 62@ = create_actor_pedtype 25 model #LSV1 at 333.63 1124.51 1082.88 
08AF: set_actor 62@ max_health_to 70 
0223: set_actor 62@ health_to 70 
0860: link_actor 62@ to_interior 5 
0173: set_actor 62@ Z_angle_to 267.96 
060B: set_actor 62@ decision_maker_to 34@ 
077A: set_actor 62@ acquaintance 3 to_actors_pedtype 0 // see ped.dat 
0107: 82@ = create_object #CIGAR at 2440.58 -1979.89 1082.2 
070A: AS_actor 62@ attach_to_object 82@ offset 0.0 0.0 0.0 on_bone 5 16 perform_animation "NULL" IFP_file "NULL" time -1 
0187: 88@ = create_marker_above_actor 62@ 
08DC: create_interior_marker 88@ at 2167.835 -1672.923 radius 2.0 
009A: 64@ = create_actor_pedtype 25 model #LSV1 at 325.0 1129.213 1082.883 
0860: link_actor 64@ to_interior 5 
0173: set_actor 64@ Z_angle_to 90.0 
0605: actor 64@ perform_animation_sequence "BJ_COUCH_LOOP_P" IFP_file "BLOWJOBZ" 4.0 loop 1 0 0 0 time -1 // versionA 
060B: set_actor 64@ decision_maker_to 34@ 
077A: set_actor 64@ acquaintance 3 to_actors_pedtype 0 // see ped.dat 
0187: 89@ = create_marker_above_actor 64@ 
08DC: create_interior_marker 89@ at 2167.835 -1672.923 radius 2.0 
009A: 65@ = create_actor_pedtype 5 model #BFYPRO at 324.0 1129.2 1082.883 
0860: link_actor 65@ to_interior 5 
0173: set_actor 65@ Z_angle_to 270.0 
0605: actor 65@ perform_animation_sequence "BJ_COUCH_LOOP_W" IFP_file "BLOWJOBZ" 4.0 loop 1 0 0 0 time -1 // versionA 
060B: set_actor 65@ decision_maker_to 75@ 
077A: set_actor 65@ acquaintance 3 to_actors_pedtype 0 // see ped.dat 
009A: 59@ = create_actor_pedtype 25 model #LSV1 at 333.4072 1124.462 1082.89 
0860: link_actor 59@ to_interior 5 
0173: set_actor 59@ Z_angle_to 83.6676 
0812: AS_actor 59@ perform_animation "CRCKIDLE3" IFP_file "CRACK" 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
060B: set_actor 59@ decision_maker_to 75@ 
0107: 81@ = create_object #CIGAR at 2440.58 -1979.89 1082.2 
070A: AS_actor 59@ attach_to_object 81@ offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time -1 
009A: 37@ = create_actor_pedtype 25 model #BMYDRUG at 306.03 1121.86 1082.87 
0860: link_actor 37@ to_interior 5 
07DD: set_actor 37@ temper_to 80 // see pedstats.dat 
08AF: set_actor 37@ max_health_to 150 
0223: set_actor 37@ health_to 150 
0173: set_actor 37@ Z_angle_to 263.66 
01B2: give_actor 37@ weapon 5 ammo 3000 // Load the weapon model before using this 
060B: set_actor 37@ decision_maker_to 34@ 
077A: set_actor 37@ acquaintance 3 to_actors_pedtype 0 // see ped.dat 
0187: 45@ = create_marker_above_actor 37@ 
08DC: create_interior_marker 45@ at 2167.835 -1672.923 radius 2.0 
0006: 32@ = 0 
03CF: load_wav 45233 as 1 
03CF: load_wav 45234 as 2 
06C9: remove_actor 69@ from_group 
0792: disembark_instantly_actor 69@ 
0647: unknown_actor 69@ look_task 
00A1: put_actor 69@ at 318.599 1114.484 1082.89 
0173: set_actor 69@ Z_angle_to 7.0 
05D3: AS_actor 69@ goto_point 324.0 1122.3 1082.8 mode 4 6000 ms // versionA 
05D3: AS_actor $PLAYER_ACTOR goto_point 320.0 1122.3 1082.8 mode 4 6000 ms // versionA 
016A: fade 1 time 2000 

:MISSN_04_5052
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_5052 

:MISSN_04_5069
0001: wait 0 ms 
00D6: if 
03D0:   wav 1 loaded 
004D: jump_if_false @MISSN_04_5069 
03D1: play_wav 1 
00BC: show_text_highpriority GXT 'CTH16' time 10000 flag 1  // ~z~All right everybody in here march over to that desk over there put your guns

:MISSN_04_5108
0001: wait 0 ms 
00D6: if 
03D2:   wav 1 ended 
004D: jump_if_false @MISSN_04_5108 
03CF: load_wav 4000 as 1 

:MISSN_04_5134
0001: wait 0 ms 
00D6: if 
03D0:   wav 2 loaded 
004D: jump_if_false @MISSN_04_5134 
03D1: play_wav 2 
00BC: show_text_highpriority GXT 'CTH17' time 10000 flag 1  // ~z~ EVERYTHING on this desk and get out of here! Let's go. Move!

:MISSN_04_5173
0001: wait 0 ms 
00D6: if 
03D2:   wav 2 ended 
004D: jump_if_false @MISSN_04_5173 
03CF: load_wav 10831 as 2 
05D3: AS_actor 64@ goto_point 323.8 1124.35 1082.89 mode 4 10000 ms // versionA 
0687: clear_actor 65@ task 
00A1: put_actor 65@ at 325.3923 1131.888 1082.883 
0173: set_actor 65@ Z_angle_to 246.147 
0605: actor 65@ perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA 
00A1: put_actor 37@ at 310.1843 1122.598 1082.89 
0173: set_actor 37@ Z_angle_to 270.0 
0164: disable_marker 38@ 
0618: assign_actor 37@ to_AS_pack 68@ 
015F: set_camera_position 319.2787 1121.339 1083.123 rotation 0.0 0.0 0.0 
0160: set_camera_point_at 318.3951 1121.773 1083.297 mode 2 
0647: unknown_actor $PLAYER_ACTOR look_task 
0001: wait 3000 ms 
00A1: put_actor 62@ at 329.29 1122.13 1082.88 
0173: set_actor 62@ Z_angle_to 90.0 
05D3: AS_actor 62@ goto_point 325.25 1122.5 1082.88 mode 6 10000 ms // versionA 
015F: set_camera_position 318.6783 1118.741 1084.642 rotation 0.0 0.0 0.0 
0160: set_camera_point_at 319.4823 1119.317 1084.494 mode 2 

:MISSN_04_5501
0001: wait 0 ms 
00D6: if 
03D0:   wav 2 loaded 
004D: jump_if_false @MISSN_04_5501 
00BE: text_clear_all 
03D1: play_wav 2 

:MISSN_04_5526
0001: wait 0 ms 
00D6: if 
03D2:   wav 2 ended 
004D: jump_if_false @MISSN_04_5526 
040D: unload_wav 1 
040D: unload_wav 2 
00A1: put_actor 37@ at 310.1843 1122.598 1082.89 
0173: set_actor 37@ Z_angle_to 270.0 
0164: disable_marker 38@ 
0618: assign_actor 37@ to_AS_pack 68@ 
00A1: put_actor 64@ at 323.5565 1124.362 1082.883 
0173: set_actor 64@ Z_angle_to 132.073 
05D3: AS_actor 64@ goto_point 323.8 1124.35 1082.89 mode 4 10000 ms // versionA 
0687: clear_actor 65@ task 
00A1: put_actor 65@ at 325.3923 1131.888 1082.883 
0173: set_actor 65@ Z_angle_to 246.147 
0605: actor 65@ perform_animation_sequence "COWER" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 // versionA 
00A1: put_actor 62@ at 326.96 1122.52 1082.89 
0173: set_actor 62@ Z_angle_to 90.0 
05D3: AS_actor 62@ goto_point 325.25 1122.5 1082.88 mode 4 10000 ms // versionA 
0001: wait 1000 ms 
0647: unknown_actor $PLAYER_ACTOR look_task 
061B: remove_references_to_AS_pack 68@ 
04EF: release_animation "BLOWJOBZ" 
04EF: release_animation "BASEBALL" 
04EF: release_animation "DEALER" 
0373: set_camera_directly_behind_player 
02A3: enable_widescreen 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
05E2: AS_actor 64@ kill_actor $PLAYER_ACTOR 
05E2: AS_actor 69@ kill_actor 62@ 
05E2: AS_actor 62@ kill_actor 69@ 
0746: set_acquaintance 0 of_actors_pedtype 24 to_actors_pedtype 0 // see ped.dat 
0746: set_acquaintance 0 of_actors_pedtype 0 to_actors_pedtype 24 // see ped.dat 
070B: set_actor 62@ onbone_attached_object_operation 1 
06C9: remove_actor 69@ from_group 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
0631: put_actor 69@ in_group $PLAYER_GROUP 
07B4: set_player $PLAYER_CHAR gang_recruitment_enabled 0 
07CB: set_actor 69@ supporting_fire 0 
05E2: AS_actor 37@ kill_actor $PLAYER_ACTOR 
0006: 99@ = 0 
//Finding the drug stash.
:MISSN_04_5934
00D6: if 
8118:   not actor 69@ dead 
004D: jump_if_false @MISSN_04_6992 
0001: wait 0 ms 
00D6: if 
0214:   pickup $DRUGS picked_up 
004D: jump_if_false @MISSN_04_6001 
0006: 99@ = 1 
00BC: show_text_highpriority GXT 'CTH19' time 5000 flag 1  // You found $5000 cash and some unidentified drugs.
0109: player $PLAYER_CHAR money += 5000 

:MISSN_04_6001
00D6: if 
0118:   actor 37@ dead 
004D: jump_if_false @MISSN_04_6022 
0164: disable_marker 45@ 

:MISSN_04_6022
00D6: if 
0118:   actor 62@ dead 
004D: jump_if_false @MISSN_04_6043 
0164: disable_marker 88@ 

:MISSN_04_6043
00D6: if 
0118:   actor 64@ dead 
004D: jump_if_false @MISSN_04_6064 
0164: disable_marker 89@ 

:MISSN_04_6064
00D6: if 
8118:   not actor 54@ dead 
004D: jump_if_false @MISSN_04_6160 
00D6: if 
8184:   not actor 54@ health >= 80 
004D: jump_if_false @MISSN_04_6160 
00D6: if 
0039:   70@ == 0 
004D: jump_if_false @MISSN_04_6160 
0829: actor 54@ perform_animation "CRCKDETH1" IFP_file "CRACK" 4.0 time 0 and_dies 
070B: set_actor 54@ onbone_attached_object_operation 1 
0006: 70@ = 2 

:MISSN_04_6160
00D6: if 
8118:   not actor 36@ dead 
004D: jump_if_false @MISSN_04_6256 
00D6: if 
8184:   not actor 36@ health >= 80 
004D: jump_if_false @MISSN_04_6256 
00D6: if 
0039:   71@ == 0 
004D: jump_if_false @MISSN_04_6256 
0829: actor 36@ perform_animation "CRCKDETH2" IFP_file "CRACK" 4.0 time 0 and_dies 
070B: set_actor 36@ onbone_attached_object_operation 1 
0006: 71@ = 2 

:MISSN_04_6256
00D6: if 
8118:   not actor 61@ dead 
004D: jump_if_false @MISSN_04_6352 
00D6: if 
8184:   not actor 61@ health >= 80 
004D: jump_if_false @MISSN_04_6352 
00D6: if 
0039:   72@ == 0 
004D: jump_if_false @MISSN_04_6352 
0829: actor 61@ perform_animation "CRCKDETH3" IFP_file "CRACK" 4.0 time 0 and_dies 
070B: set_actor 61@ onbone_attached_object_operation 1 
0006: 72@ = 2 

:MISSN_04_6352
00D6: if 
8118:   not actor 59@ dead 
004D: jump_if_false @MISSN_04_6448 
00D6: if 
8184:   not actor 59@ health >= 80 
004D: jump_if_false @MISSN_04_6448 
00D6: if 
0039:   73@ == 0 
004D: jump_if_false @MISSN_04_6448 
0829: actor 59@ perform_animation "CRCKDETH4" IFP_file "CRACK" 4.0 time 0 and_dies 
070B: set_actor 59@ onbone_attached_object_operation 1 
0006: 73@ = 2 

:MISSN_04_6448
00D6: if 
8118:   not actor 49@ dead 
004D: jump_if_false @MISSN_04_6544 
00D6: if 
8184:   not actor 49@ health >= 80 
004D: jump_if_false @MISSN_04_6544 
00D6: if 
0039:   74@ == 0 
004D: jump_if_false @MISSN_04_6544 
0829: actor 49@ perform_animation "CRCKDETH3" IFP_file "CRACK" 4.0 time 0 and_dies 
070B: set_actor 49@ onbone_attached_object_operation 1 
0006: 74@ = 2 

:MISSN_04_6544
00D6: if and
0118:   actor 37@ dead 
0118:   actor 62@ dead 
0118:   actor 64@ dead 
004D: jump_if_false @MISSN_04_5934 
00D6: if 
0039:   99@ == 0 
004D: jump_if_false @MISSN_04_6606 
0006: 99@ = 1 
03E5: show_text_box 'CTH18'  // Perform a search for their drugs.

:MISSN_04_6606
00D6: if 
00ED:   actor $PLAYER_ACTOR 0 near_point 318.599 1114.484 radius 1.0 1.0 on_foot 
004D: jump_if_false @MISSN_04_5934 
016A: fade 0 time 1000 
0249: release_model #BMYDRUG 
0249: release_model #LSV1 
0249: release_model #HFYPRO 
0249: release_model #BFYPRO 
0249: release_model #CIGAR 

:MISSN_04_6671
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_6671 
0581: enable_radar 1 
03CB: set_rendering_origin_at 2375.743 -1147.309 28.0782 
04BB: select_interior 0 
0860: link_actor $PLAYER_ACTOR to_interior 0 
00A1: put_actor $PLAYER_ACTOR at 2352.483 -1170.936 27.9687 
0173: set_actor $PLAYER_ACTOR Z_angle_to 2.8 
0373: set_camera_directly_behind_player 
02A3: enable_widescreen 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
03E5: show_text_box 'CTH20'  // Get Hernandez back to the station.
05D3: AS_actor $PLAYER_ACTOR goto_point 2351.694 -1166.542 27.4443 mode 4 500 ms // versionA 

:MISSN_04_6801
0001: wait 0 ms 
00D6: if 
00ED:   actor $PLAYER_ACTOR 0 near_point 2351.694 -1166.542 radius 1.0 1.0 on_foot 
004D: jump_if_false @MISSN_04_6801 
016A: fade 1 time 1000 

:MISSN_04_6850
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_6850 
0164: disable_marker 38@ 
018A: 38@ = create_checkpoint_at 1534.972 -1674.875 12.9589 

:MISSN_04_6892
0001: wait 0 ms 
00D6: if 
8118:   not actor 69@ dead 
004D: jump_if_false @MISSN_04_7096 
00D6: if and
00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere 1534.972 -1674.875 12.9589 radius 4.0 4.0 4.0 
0104:   actor 69@ near_actor $PLAYER_ACTOR radius 30.0 30.0 8.0 sphere 0 
004D: jump_if_false @MISSN_04_6892 
0002: jump @MISSN_04_7209 

:MISSN_04_6992
016A: fade 0 time 1000 

:MISSN_04_6999
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_6999 
03CB: set_rendering_origin_at 2375.743 -1147.309 28.0782 
04BB: select_interior 0 
0860: link_actor $PLAYER_ACTOR to_interior 0 
00A1: put_actor $PLAYER_ACTOR at 2351.694 -1166.542 27.4443 
0173: set_actor $PLAYER_ACTOR Z_angle_to 2.8 
0373: set_camera_directly_behind_player 
02A3: enable_widescreen 0 
01B4: set_player $PLAYER_CHAR can_move 1 
02EB: restore_camera_with_jumpcut 
016A: fade 1 time 1000 

:MISSN_04_7096
0001: wait 0 ms 
00D6: if 
816B:   not fading 
004D: jump_if_false @MISSN_04_7096 
00D6: if 
0118:   actor 69@ dead 
004D: jump_if_false @MISSN_04_7150 
00BC: show_text_highpriority GXT 'CTH21' time 5000 flag 1  // Officer Hernandez is dead.
0001: wait 5000 ms 

:MISSN_04_7150
02A7: $CRASH_MARKER = create_icon_marker_and_sphere 16 at 1541.156 -1675.352 13.552 
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!

:MISSN_04_7188
0004: $ONMISSION = 0 
01BD: $Current_Time_in_ms = current_time_in_ms 
0164: disable_marker 38@ 
00D8: mission_cleanup 
0051: return 

:MISSN_04_7209
0008: $MISSION_TP += 1 
02A7: $CRASH_MARKER = create_icon_marker_and_sphere 16 at 2471.696 -1888.937 15.0156 
01E3: show_text_1number_styled GXT 'M_PASSR' number 3 time 5000 style 1  // MISSION PASSED!~n~~w~RESPECT +
0998: add_respect 3 
076C: set_zone 'GAN1' gang 1 density_to 40 
076C: set_zone 'GAN2' gang 1 density_to 40 
0110: clear_player $PLAYER_CHAR wanted_level 
0394: play_music 1 
030C: progress_made += 1 
0051: return 
//Plays the audio in the cut scene.
:MISSN_04_7305
0001: wait 0 ms 
00D6: if 
03D0:   wav 1 loaded 
004D: jump_if_false @MISSN_04_7305 
03D1: play_wav 1 
//My own cut scene skip command
:MISSN_04_7328
0001: wait 0 ms 
00D6: if 
00E1:   player 0 pressed_key 16 
004D: jump_if_false @MISSN_04_7363 
0006: 75@ = 1 
0002: jump @MISSN_04_7378 

:MISSN_04_7363
00D6: if 
03D2:   wav 1 ended 
004D: jump_if_false @MISSN_04_7328 

:MISSN_04_7378
040D: unload_wav 1 
0051: return 
